﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
    xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Brushes.xaml"/>
        <ResourceDictionary Source="Fonts.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <!-- ******MAIN PAGE STYLES****** -->
    <!-- **************************** -->

    <Style x:Key="LayoutRootGridStyle" TargetType="Grid">
    </Style>

    <Style x:Key="NavigationGridStyle" TargetType="Grid">
        <Setter Property="Margin" Value="10,10,0,0"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
    </Style>

    <Style x:Key="BrandingBorderStyle" TargetType="Border">
        <Setter Property="Height" Value="Auto"/>
        <Setter Property="Margin" Value="62,0,20,10"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
    </Style>

    <Style x:Key="BrandingStackPanelStyle" TargetType="StackPanel">
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="Orientation" Value="Vertical"/>
    </Style>

    <Style x:Key="LogoIcon" TargetType="ContentControl">
        <Setter Property="Height" Value="45"/>
        <Setter Property="Width" Value="280"/>
        <Setter Property="Margin" Value="0,0,100,0"/>
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="HorizontalAlignment" Value="Right" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>
                        <Rectangle Fill="{StaticResource HighlightBrush}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ApplicationNameStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{StaticResource ApplicationNameBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ApplicationNameFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated" />
        <Setter Property="Margin" Value="13,4,53,0"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
    </Style>

    <Style x:Key="HeaderTextStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{StaticResource HighlightBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource HeaderFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated" />
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="Margin" Value="0,4,0,8"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
    </Style>

    <Style x:Key="PageHyperlinkButtonStyle" TargetType="HyperlinkButton">
        <Setter Property="TargetName" Value="_new"/>
        <Setter Property="FontSize" Value="{StaticResource HyperlinkFontSize}"/>
		<Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated" />
    </Style>

    <Style x:Key="LinksBorderStyle" TargetType="Border">
        <Setter Property="Height" Value="82"/>
        <Setter Property="Margin" Value="0,36,25,0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="BorderBrush" Value="{StaticResource HighlightBrush}"/>
        <Setter Property="BorderThickness" Value="30,0,0,0"/>
    </Style>

    <Style x:Key="LinksStackPanelStyle" TargetType="StackPanel">
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="Orientation" Value="Horizontal"/>
        <Setter Property="Margin" Value="35,0,0,0"/>
    </Style>

    <Style x:Key="LinkStyle" TargetType="HyperlinkButton">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="{StaticResource NavigationBorderBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource NavigationForegroundBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource NavigationFontSize}"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated" />
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="MinHeight" Value="28"/>
        <Setter Property="MinWidth" Value="78"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="8,0,18,4"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="HyperlinkButton">
                    <Grid x:Name="ButtonGrid" Cursor="{TemplateBinding Cursor}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.95"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveElementBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.8"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="InteractiveBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <HorizontalAlignment>Center</HorizontalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <VerticalAlignment>Center</VerticalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="(FrameworkElement.HorizontalAlignment)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <HorizontalAlignment>Center</HorizontalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="(FrameworkElement.VerticalAlignment)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <VerticalAlignment>Center</VerticalAlignment>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="LinkStates">
                                <VisualState x:Name="ActiveLink">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InactiveLink"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="ContentBorder" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" Opacity="0.4" Padding="0">
                            <ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                        </Border>
                        <Border x:Name="InteractiveBorder" MinWidth="{TemplateBinding MinWidth}" MinHeight="{TemplateBinding MinHeight}" Background="{StaticResource HoverHyperlinkBackgroundBrush}" BorderThickness="1,1,1,1" Opacity="0" BorderBrush="{StaticResource HoverHyperlinkBackgroundBrush}" CornerRadius="0"/>
                        <Border x:Name="InteractiveElementBorder" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed">
                            <TextBlock x:Name="InteractiveElement" Foreground="{StaticResource HoverHyperlinkForegroundBrush}" FontSize="{TemplateBinding FontSize}" FontWeight="{TemplateBinding FontWeight}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Text="{TemplateBinding Content}"/>
                        </Border>
                        <TextBlock x:Name="DisabledOverlay" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Text="{TemplateBinding Content}" Foreground="#FFAAAAAA" Visibility="Collapsed"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ContentBorderStyle" TargetType="Border">
        <Setter Property="Background" Value="{StaticResource WhiteColorBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource PageBorderBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Margin" Value="10"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>

        <!--<Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect BlurRadius="10" Opacity="0.25" ShadowDepth="0"/>
            </Setter.Value>
        </Setter>-->
    </Style>

    <Style x:Key="ContentFrameStyle" TargetType="navigation:Frame">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Margin" Value="15,195,0,0"/>
        <Setter Property="Padding" Value="58,15,58,8"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
    </Style>

    <Style x:Key="DividerStyle" TargetType="Rectangle">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- **STYLE UPDATES FOR NAV TEMPLATE** -->
    <!-- ********************************** -->
    <Style x:Key="NavContentBorderStyle" TargetType="Border">
        <Setter Property="Margin" Value="15,30,0,0" />
    </Style>

    <Style x:Key="NavContentFrameStyle" TargetType="navigation:Frame" BasedOn="{StaticResource ContentFrameStyle}">
        <Setter Property="Margin" Value="0"/>
        <Setter Property="UriMapper">
            <Setter.Value>
                <uriMapper:UriMapper>
                    <uriMapper:UriMapping MappedUri="/Views/Samples.xaml" Uri="" />
                    <uriMapper:UriMapping MappedUri="/Views/{pageName}.xaml" Uri="/{pageName}" />
                </uriMapper:UriMapper>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="NavBrandingBorderStyle" TargetType="Border">
        <Setter Property="Margin" Value="62,0,10,4"/>
    </Style>

    <Style x:Key="NavLinksBorderStyle" TargetType="Border" BasedOn="{StaticResource LinksBorderStyle}">
        <Setter Property="Margin" Value="0,0,10,0"/>
    </Style>

    <!-- ******CONTENT PAGE STYLES****** -->
    <!-- ******************************* -->
    <Style x:Key="PageStyle" TargetType="navigation:Page"/>

    <Style x:Key="PageScrollViewerStyle" TargetType="ScrollViewer">
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0,1,0,1"/>
        <Setter Property="Padding" Value="0" />
        <Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="HorizontalScrollBarVisibility" Value="Disabled"/>
    </Style>

    <Style x:Key="ContentPanelStyle" TargetType="StackPanel"/>

    <Style x:Key="ContentTextStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{StaticResource BodyTextColorBrush}"/>
        <Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
        <Setter Property="TextWrapping" Value="Wrap"/>
        <Setter Property="Margin" Value="0,2,0,2"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="TextOptions.TextHintingMode" Value="Animated" />
    </Style>

</ResourceDictionary>